#include "myapp.h"

Myapp::Myapp(QObject *parent) : QObject(parent)
{
    //显示管理员登录界面
    main.show();
    connect(&main,&MainWindow::ToregisterSignal,this,&Myapp::ToregisterSlot);
    connect(&main,&MainWindow::ToxinxiSignal,this,&Myapp::ToxinxiSlot);
    connect(&reg,&Register::TomainSignal,this,&Myapp::TomainSlot);
    connect(&pay,&pay::ToxinxiSignal,this,&Myapp::ToxinxiSlot2);
    connect(&xx,&xinxi::TopaySignal,this,&Myapp::TopaySlot);
}

void Myapp::ToregisterSlot()
{
    //离开主页面，进入注册页面
    main.hide();
    reg.show();
}

void Myapp::ToxinxiSlot()
{
    //离开主页面，进入登录页面
    main.hide();
    xx.show();
}

void Myapp::TomainSlot()
{
    //离开注册页面，进入主页面
    reg.hide();
    main.show();
}

void Myapp::ToxinxiSlot2()
{
    //离开支付页面，进入信息页面
    pay.hide();
    xx.show();

}

void Myapp::TopaySlot()
{
    //离开信息界面，进入充值页面
    xx.hide();
    pay.show();

}

